<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width,initial-scale=1">
    </head>
    <title>学习笔记</title>

    <!-- Bootstrap 3 CSS CDN -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- jQuery CDN (Bootstrap 依赖) -->
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <!-- Bootstrap 3 JavaScript CDN -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js"></script>

    <body>
          <nav class="navbar navbar-default navbar-static-top">
              <div class="container">
                <div class="navbar-header">
                  <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<!--                    <span class="sr-only">Toggle navigation</span>-->
<!--                    <span class="icon-bar"></span>-->
<!--                    <span class="icon-bar"></span>-->
<!--                    <span class="icon-bar"></span>-->
                  </button>
                  <a class="navbar-brand" href="{% url 'learning_logs:index' %}">学习笔记</a>
                </div>
                <div id="navbar" class="navbar-collapse collapse">
                  <ul class="nav navbar-nav">
                    <li><a href="{% url 'learning_logs:topics' %}">主题</a></li>


                  </ul>
                  <ul class="nav navbar-nav navbar-right">
                      {%  if user.is_authenticated  %}
                      <li><a>Hello,{{ user.username }}.</a></li>
                      <li><a href="{% url 'users:logout' %}">注销</a></li>
                      {% else  %}
                      <li><a href="{% url 'users:register' %}">注册</a></li>
                      <li><a href="{% url 'users:login' %}">登录</a></li>
                      {%  endif %}
                  </ul>
                </div><!--/.nav-collapse -->
              </div>
        </nav>
          <!--      -->
        <div class="container">
            <div class="page-header">
                {% block header %}{%  endblock header %}

            </div>
            <div>
                {% block content %}
                {%  endblock %}

            </div>
        </div>


    </body>



</html>
